package com.uwlaser.domain;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.uwlaser.base.CommonEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * @author yangwei
 * @create 2022/11/30
 */
@Data
@Builder
@Accessors(chain = true)
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = false)
@TableName(value = "anton_record",schema="uw_mes")
public class AntonRecord extends CommonEntity<AntonRecord> implements Serializable {
    private static final long serialVersionUID = 1L;
    /** ID */
    @TableId(type= IdType.AUTO)
    private Integer id ;

    @ApiModelProperty(value = "安东编码")
    private String antonCode ;

    @ApiModelProperty(value = "描述")
    private String description ;

    @ApiModelProperty(value = "备注")
    private String remark ;

    @ApiModelProperty(value = "呼叫开始时间")
    private String beginTime;

    @ApiModelProperty(value = "呼叫结束时间")
    private String endTime;

    @ApiModelProperty(value = "耗时（分）")
    private String consumeTime;

    @ApiModelProperty(value = "触发设备编号")
    private String deviceCode;

    public void copyFrom(AntonRecord source){
        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
    }
}
